package com.jvm;

import sun.misc.Launcher;

import java.lang.ref.SoftReference;

public class Math {

    public static final int initData = 666;
    //强引用
    public static User user = new User();
    //软引用 有可能被垃圾回收掉
    public static SoftReference<User> softReference = new SoftReference<User>(new User());

    //一个方法对应一块栈帧内存区域
    public int compute(){
        int a = 1;
        int b = 2;
        int c = (a+b)*10;
        return c;
    }

    public static void main(String[] args) {
        Launcher.getLauncher();
        //Thread.currentThread().setContextClassLoader(this.loader);
        //sum.misc.Launchar.getLauncher();
        Math math = new Math();
        math.compute();

    }
}
